package cc.shacocloud.luanniao.core.model.po

import cc.shacocloud.luanniao.core.model.constant.UserAuthRoleEnum
import cc.shacocloud.luanniao.core.model.constant.UserStatusEnum
import org.springframework.data.relational.core.mapping.Column
import org.springframework.data.relational.core.mapping.Table

/**
 * 用户表
 * @author 思追(shaco)
 */
@Table("def_user")
data class UserPo(

    /**
     * 账号
     */
    @Column("username")
    var username: String,

    /**
     * 密码
     */
    @Column("password")
    var password: String,

    /**
     * 昵称
     */
    @Column("nickname")
    var nickname: String,

    /**
     * 头像链接地址
     */
    @Column("avatar")
    var avatar: String? = null,

    /**
     * 用户状态枚举
     */
    @Column("status")
    var status: UserStatusEnum = UserStatusEnum.NORMAL,

    /**
     * 用户角色
     */
    @Column("role")
    val role: UserAuthRoleEnum,
) : BasePo()
